package com.cucn.eduservice.service;

import com.cucn.eduservice.entity.EduChapter;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cucn.eduservice.entity.chapter.ChapterVO;

import java.util.List;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author KouChaoJie
 * @since 2021-09-29
 */
public interface EduChapterService extends IService<EduChapter> {

    /**
     * 根据课程id查询章节小节
     *
     * @param courseId 课程id
     * @return 该课程的所有章节小节list集合
     */
    List<ChapterVO> getChapterVideoByCourseId(String courseId);

    /**
     * 删除章节
     *
     * @param chapterId 删除章节的对应id
     * @return 是否删除成功
     */
    boolean deleteChapter(String chapterId);

    /**
     * 根据课程id删除章节
     *
     * @param courseId 章节对应的课程id
     */
    void removeChapterByCourseId(String courseId);
}
